﻿<Window x:Class="YsBuildRunner.Main.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="YS Build Runner" Height="300" Width="300" WindowStartupLocation="CenterScreen" 
		Icon="/YsBuildRunner;component/Images/app.png" Loaded="Window_Loaded" Closing="Window_Closing"
		Style="{StaticResource MyWindow}">
	<Window.InputBindings>
		<KeyBinding Command="{Binding Path=CommandAdd}" Gesture="Insert"/>
		<KeyBinding Command="{Binding Path=CommandEdit}" Gesture="Enter"/>
		<KeyBinding Command="{Binding Path=CommandDelete}" Gesture="Delete"/>

		<KeyBinding Command="{Binding Path=CommandExit}" Gesture="CTRL+Q"/>
	</Window.InputBindings>

	<DockPanel>
		<Menu DockPanel.Dock="Top">
			<MenuItem Header="_File">
				<MenuItem Header="_Config" Command="{Binding Path=CommandConfig}"/>
				<Separator/>
				<MenuItem Header="E_xit" Command="{Binding Path=CommandExit}" InputGestureText="CTRL+Q"/>
			</MenuItem>
			<MenuItem Header="_Build">
				<MenuItem Header="_Add" Command="{Binding Path=CommandAdd}" InputGestureText="Insert"/>
				<MenuItem Header="_Edit" Command="{Binding Path=CommandEdit}" InputGestureText="Enter"/>
				<MenuItem Header="_Delete" Command="{Binding Path=CommandDelete}" InputGestureText="delete"/>
			</MenuItem>
			<MenuItem Header="_Help">
				<MenuItem Header="_About" Click="MenuItemAboutClick"/>
			</MenuItem>
		</Menu>

		<StatusBar DockPanel.Dock="Bottom">

		</StatusBar>

		<ListBox DockPanel.Dock="Top" Name="listBoxBuilds" ItemsSource="{Binding Path=Storage.Builds}">
			<ListBox.ItemContainerStyle>
				<Style TargetType="{x:Type ListBoxItem}">
					<EventSetter Event="MouseDoubleClick" Handler="ListBoxBuildsMouseDoubleClick" />
					<Setter Property="IsSelected" Value="{Binding Mode=TwoWay, Path=IsSelected}"/>
				</Style>
			</ListBox.ItemContainerStyle>
			<ListBox.ItemTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding Path=BuildName}"/>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
	</DockPanel>
</Window>
